<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- 
三个参数：
1.hasPermission shiro权限控制，可空
2.btnSubmitName 提交按钮名称，默认为保存
3.btnCancelName 关闭按钮名称，默认为关闭
 -->

<c:if test="${param.btnSubmitName == null}">
	<c:set var="btnSubmitName" value="保存"></c:set>
</c:if>
<c:if test="${param.btnCancelName == null}">
	<c:set var="btnCancelName" value="关闭"></c:set>
</c:if>

<c:if test="${param.btnSubmitName != null}">
	<c:set var="btnSubmitName" value="${param.btnSubmitName}"></c:set>
</c:if>
<c:if test="${param.btnCancelName != null}">
	<c:set var="btnCancelName" value="${param.btnCancelName}"></c:set>
</c:if>

<div class="form-actions">
	<c:if test="${param.hasPermission != null}">
		<shiro:hasPermission name="${param.hasPermission}">
			<input id="btnSubmit" class="btn btn-primary" type="submit"
				value="${btnSubmitName}"
				onclick="$('#closedwindow', window.parent.document).val('true');" />&nbsp;
			</shiro:hasPermission>
	</c:if>

	<c:if test="${param.hasPermission == null}">
		<input id="btnSubmit" class="btn btn-primary" type="submit"
			value="${btnSubmitName}"
			onclick="$('#closedwindow', window.parent.document).val('true');" />&nbsp;
	</c:if>
   
	<input id="btnCancel" class="btn" type="button" value="${btnCancelName}"
		onclick="top.$.jBox.close(true);" />
</div>
